<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/23/023
 * Time: 17:16
 */

namespace app\api\validate;


class AdminValidate extends BaseValidate {
    protected $rule = [
        'id' => 'isPositiveInteger',
        'username' => 'require|between:5,20',
        'password' => 'require|length:5,21|regex:/^(?=.*\d)(?=.*[a-zA-Z]).{6,20}$/|confirm',
        'mobile' => 'require|mobile',
        'email' => 'require|email',
    ];


    protected $message=[
        'id' => 'id必须是正整数'
    ];
}